<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    .box{
        width: 400px;
        height: 400px;
        /* background-color: skyblue; */
        margin: 150px auto;
        position: relative;
        transform: rotate3d(1,1,1,30deg);
        transform-style: preserve-3d; 
        animation: play 6s infinite linear;  
    }
    .box>div{
        width: 400px;
        height: 400px;
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0.5;
    }
    .left{
        background-color: lawngreen;
        transform: translateX(-200px) rotateY(-90deg);
    }
    .right{
        background-color: royalblue;
        transform: translateX(200px) rotateY(90deg);
    }
    .front{
        background-color: fuchsia;
        transform: translateZ(200px);
    }
    .back{
        background-color: burlywood;
        transform: translateZ(-200px);
    }
    .up{
        background-color: aquamarine;
        transform: translateY(-200px) rotateX(90deg);
    }
    .down{
        background-color: darkorange;
        transform: translateY(200px) rotateX(-90deg);
    }
    @keyframes play {
        from{
            
        }
        to{
            transform: rotateX(360deg) rotateY(270deg);
        }
    }
    </style>
</head>
<body>
    <div class="box">
        <div class="front">Front</div>
        <div class="back">Back</div>
        <div class="up">up</div>
        <div class="down">down</div>
        <div class="left">Left</div>
        <div class="right">Right</div>
    </div>
</body>
</html>